<?php
    include('./library/conn.php');

    $username = $_REQUEST['username'];
    $password = $_REQUEST['password'];

    // 查询语句
    $select = "select * from users where username='$username' and password='$password'";

    $result = $conn->query($select);

    $conn->close();

    if($result->num_rows>0){
        echo '{"msg":"登录成功","success":1}';
    }else{
        echo '{"msg":"用户名或密码错误","success":0}';
    }
?>